const express = require('express')

const jqAjax = require('./routes/jq-ajax')

const app = express()
const port = 3000

// tip: 中间件要在路由其那注册
app.use(express.urlencoded({ extended: false }))
app.use(express.static('demo'))

// 注册路由
app.use('/jq-ajax', jqAjax)

// app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`http://localhost:${port}/index.html`))
